/**
 通过value找到key; js通过对象的属性值找到属性名
 用法     console.log(formatDate(1521783347000));//2018-03-23 13:35:47  参数为Number
  */
export default formatDate

	function formatDate(date){
        date = new Date(date);
        var y=date.getFullYear();
        var m=date.getMonth()+1;
        var d=date.getDate();
        var h=date.getHours();
        var m1=date.getMinutes();
        var s=date.getSeconds();
        m = m<10?("0"+m):m;
        d = d<10?("0"+d):d;
        h = h<10?("0"+h):h;
        m1 = m1<10?("0"+m1):m1;
		s = s<10?("0"+s):s;
        return y+"-"+m+"-"+d+" "+h+":"+m1+":"+s;
    }
